<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 数组的解构赋值
        // 1
        var arr1 = ['Hello', 'World'];

        let [a,b] = ['Hello', 'World'];


        // 2
        var arr2 = ['Hello', 'World', 0 , 1];

        let [a,b,c,d] = ['Hello', 'World', 0 , 1];


        // 3
        var arr3 = [0, 0, 'Hello', 'World'];

        let [a,b,c,d] = [0, 0, 'Hello', 'World'];


        // 4
        var arr4 = [['Hello', 'World']];

        let [[a,b]] = [['Hello', 'World']];


        // 5
        var arr5 = [0 ,0 ,['Hello', 'World']];

        let [a,b,[c,d]] = [0 ,0 ,['Hello', 'World']];


        // 6
        var arr6 = ['Hello', ['World']];

        let [a,[b]] = ['Hello', ['World']];
        

        // 7
        var arr7 = [['Hello'], ['World']];

        let [[a],[b]] = [['Hello'], ['World']];


        // 8
        var arr8 = [[0,'Hello'], [0,['World']]];

        let [[a,b],[c,[d]]] = [[0,'Hello'], [0,['World']]];
    </script>
</body>
</html>